package scau.erps.view.decision.table;

import java.util.List;

import scau.erps.app.Erps;
import scau.erps.entity.Loan;
import scau.erps.entity.Team;
import scau.erps.service.LoanService;
import scau.erps.service.impl.LoanServiceImpl;

public class LoanListPanel extends ListPanelTemplate{
	private static final long serialVersionUID = 1L;
	public LoanListPanel(){		
		super();
		this.loadList();
		
	}
	public void loadList(){
		Team team = Erps.getCurrentTeam();
		LoanService loanService = Erps.getIocInstance().get(LoanServiceImpl.class);
		List<Loan> list = loanService.getLoans(team.getId(), "短贷", "已审核");
		LoanListModel model = new LoanListModel(list);
		table.setModel(model);
	}
}
